package com.oig.sys.auth.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;

import lombok.Data;

import java.util.Date;
import java.util.List;

@Data
@Schema(description = "用户视图信息")
public class UserVo {

    @Schema(description = "主键id")
    private Integer id;
    @Schema(description = "登录账户")
    private String username;
    @Schema(description = "别名")
    private String nickName;
    @Schema(description = "工号")
    private String code;
    @Schema(description = "手机号")
    private String phone;
    @Schema(description = "e-mail")
    private String email;
    @Schema(description = "真实姓名或中文名")
    private String realName;
    @Schema(description = "性别")
    private String sex;
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    @Schema(description = "生日")
    private Date birthday;
    @Schema(description = "学历")
    private String education;
    @Schema(description = "毕业院校")
    private String school;

    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    @Schema(description = "毕业时间")
    private Date graduationDate;

    @Schema(description = "状态")
    private String status;

    @Schema(description = "租户id")
    private Integer tenantId;
    @Schema(description = "租户编码")
    private String tenantCode;
    @Schema(description = "租户名称")
    private String tenantName;

    @Schema(description = "创建人")
    private String createUserName;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @Schema(description = "创建时间")
    private Date createTime;

    @Schema(description = "最后更新人")
    private String lastUpdateName;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @Schema(description = "最后更新时间")
    private Date lastUpdateTime;

    @Schema(description = "是否允许删除 1-允许 0-不允许")
    private String noDelFlag;
    @Schema(description = "默认进入的子系统")
    private Integer defaultSysId;
    @Schema(description = "默认进入的子系统名称")
    private String defaultSysName;
    @Schema(description = "默认进入的子系统图标")
    private String defaultSysImgUrl;
    @Schema(description = "密码")
    private String password;

    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    @Schema(description = "密码过期日")
    private Date expDate;
    @Schema(description = "密码错误次数")
    private Integer pwdFailNum;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @Schema(description = "上次密码错误")
    private Date pwdFailTime;

    @Schema(description = "最后一次登录id")
    private String lastLoginIp;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @Schema(description = "最后一次登录时间")
    private Date lastLoginTime;

    @Schema(description = "所属部门列表")
    private List<DepartmentVo> departmentList;

    @Schema(description = "职务列表")
    private List<JobVo> jobList;

    @Schema(description = "角色列表")
    private List<RoleVo> roleList;

}
